package com.ea.admin.pojo.param.user;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AddUserItemParam {
    @ApiModelProperty(value = "照片的md5", required = true)
    @NotBlank(message = "照片的md5不能为空")
    private String photo;

    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank(message = "姓名不能为空")
    @Size(max = 10, message = "姓名不能超过10个字符")
    private String name;

    @ApiModelProperty(value = "性别", required = true)
    @NotBlank(message = "性别不能为空")
    @Size(max = 1, message = "性别不能超过1个字符")
    private String sex;

    @ApiModelProperty(value = "出生日期", required = true)
    @NotNull(message = "出生日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date birthday;

    @ApiModelProperty(value = "单位id", required = true)
    @NotBlank(message = "单位id不能为空")
    private String companyId;

    @ApiModelProperty(value = "部门id", required = true)
    @NotBlank(message = "部门id不能为空")
    private String deptId;

    @ApiModelProperty(value = "职位id", required = true)
    @NotBlank(message = "职位id不能为空")
    private String positionId;
}
